package cus_utils

import (
	"log"

	"github.com/teamlint/opencc"
)

type Lang struct {
}

func (*Lang) Trans(cont string, strType string) (string, error) {
	s2t, err := opencc.New(strType)
	if err != nil {
		log.Fatal(err)
	}
	out, err := s2t.Convert(cont)
	if err != nil {
		log.Fatal(err)
	}
	return out, nil

}

var LangBlock = new(Lang)
